#pragma once

#ifndef _CABILITY_H_
#define _CABILITY_H_


class CAbility
{
private:
	
	char			m_abilityName[50];
	unsigned short	m_abilityID;
	unsigned short	m_recastTime;
	unsigned short  m_Msg;
	unsigned short  m_defaultMsg;
	unsigned short  m_animID;
	unsigned short  m_animCatID;
	unsigned short  m_allowedTargets;	 //bitmask
	unsigned short  m_isAOE;			 //0 = singletarget, 1 = aoe
	unsigned short  m_currentTargetNum;
	unsigned short  m_job;
	unsigned short  m_level;
	unsigned short  m_range;

	unsigned short  m_message;
	unsigned short  m_result;

	CBaseEntity *	m_pUser;
	CBaseEntity *	m_pMainTarget;
	unsigned int	m_targetID;
	unsigned int	m_recastID;

public:

	CAbility(unsigned short abilityID);
	~CAbility(void);

	std::vector<CBaseEntity*> m_targetList;

	char * getAbilityName();
	unsigned short getAbilityID();
	unsigned short getAbilityAnimID();
	unsigned short getAbilityAnimCatID();

	void setAbilityTargetID(unsigned int targetID);
	void setUser(CBaseEntity * pUser);
	void setMainTarget(CBaseEntity * pTarget);
	void setAnimation(unsigned short animation);

	unsigned int getAbilityTargetID();
	CBaseEntity * getUser();
	CBaseEntity * getMainTarget();

	unsigned short getAbilityRange();
	unsigned short getAbilityRecast();
	unsigned short getAbilityRecastID();

	void performAbility();
	unsigned short getAllowedTargets();
	bool isValidTarget(CBaseEntity * pTarget);
	bool isAOEAbility();

	void addTarget(CBaseEntity * pTarget);

	void setMessage(unsigned short msg);
	unsigned short getMessage();

	void setResult(unsigned short result);
	unsigned short getResult();

	

};


#endif
